﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PloobsEngine.Publishers;


namespace PloobsEngine.IA
{
    public abstract class IActuator : ISubject
    {
        #region ISubject Members
        private ISubject _sub = new ConcreteSubject(); 
        public int ObserverNumber()
        {
            return _sub.ObserverNumber();
        }

        public void Attach(IObserver obs)
        {
            _sub.Attach(obs);
        }

        public void Dettach(IObserver obs)
        {
            _sub.Dettach(obs);
        }

        public void DettachAll()
        {
            _sub.DettachAll();
        }

        public void Notify(object obj)
        {
            _sub.Notify(obj);
        }

        #endregion

        public void Actuate()
        {
            this.Notify(PerformAct());
        }

        private String _name;
        public String Name
        {
            get
            {
                return _name;
            }
            set
            {
                this._name = value;
            }
        }
        public abstract ActuatorSensorInformation PerformAct();
    }
}
